A NAND flash memory as a nonvolatile semiconductor memory can store, for example, multilevel data, using a plurality of threshold voltages for each memory cell. If a high threshold voltage is repeatedly applied to a memory cell, the tunnel oxide film of the memory cell is degraded, thereby shortening the life of the cell. Further, if there are great differences in threshold voltage between a plurality of memory cells arranged adjacent to each other along a word or bit line, the memory cells having a low threshold voltage vary in threshold voltage, which may cause, for example, program disturbance.